<?php
header("Content-type: image/png");

$image = imagecreate(50, 15);
$color = imagecolorallocate($image, 136, 200, 225);
$bgcolor = imagecolorallocate($image, 255, 255, 225);
$color2 = imagecolorallocate($image, 219, 231, 241);
$red = imagecolorallocate($image, 255, 0, 0);

imagefill($image, 0, 0, $color);
imagefilledrectangle($image, 1, 2, 48, 11, $bgcolor);
imagefilledrectangle($image, 1, 2, $_GET[percentage]/100*46, 11, $color2);
imagestring($image, 1, 3, 4, "$_GET[percentage]%", $red);

imagepng($image);
imagedestroy($image);
?>